import axios from '@/libs/request/axios'
import QS from 'qs';

//查询合同重出列表
export const findContractReissueList = (params) => {
    return axios.request({
        url: `/contractManage/contractReissur/findContractReissueList`,
        method: 'POST',
        data: params
    })
};

//合同重出保存
export const saveContractReissue = (params) => {
    return axios.request({
        url: `/contractManage/contractReissur/saveContractReissue`,
        method: 'POST',
        data: params
    })
};

//合同重出提交
export const submitContractReissue = (params) => {
    return axios.request({
        url: `/contractManage/contractReissur/submitContractReissue`,
        method: 'POST',
        data: params
    })
};

// 删除案件
export const delById = (id, params) => {
    return axios.request({
        url: `/contractManage/contractReissur/delById/${id}`,
        params: params,
        method: 'delete'
    })
};

// 流程审批
export const saveProposalApplicationInfo = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/saveProposalApplicationInfo`,
        method: 'POST',
        data: params
    })
};
// 查询其他版本
export const queryContract = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryContract`,
        method: 'POST',
        data: params
    })
};

// 查询最新版本
export const queryNewContract = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryNewContract`,
        method: 'POST',
        data: params
    })
};

// 查询最新版本
export const queryContractByScene = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryContractByScene`,
        method: 'POST',
        data: params
    })
};
// 通过合同名称查询合同版本号
export const queryContractByName = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryContractByName`,
        method: 'POST',
        data: params
    })
};

// 添加合同文件
export const addContractFile = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/addContractFile`,
        method: 'POST',
        data: params
    })
};

// 打印合同
export const downContractList = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/downContractList`,
        method: 'POST',
        data: params,
        responseType: "blob"
    })
};

//生成合同
export const printContract = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/printContract`,
        method: 'POST',
        data: params,
    })
};

//生成合同
export const queryContractInfo = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryContractInfo`,
        method: 'POST',
        data: params,
    })
};

// 查询业务办理合同
export const queryBusinessContract = ( params) => {
    return axios.request({
        url: `/contractManage/contractReissur/queryBusinessContract`,
        method: 'POST',
        data: params
    })
};
